- 
                Notifications
    You must be signed in to change notification settings 
- Fork 424
SoA: InitRandom/OnePerCell #3280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
3ca6008    to
    8aec382      
    Compare
  
    a2420d6    to
    0d800a5      
    Compare
  
    | p.pos(0) = static_cast<ParticleReal>(grid_box.lo(0) + (dist(mt) + icnt) / icount_per_box * grid_box.length(0)); | ||
| p.pos(1) = static_cast<ParticleReal>(grid_box.lo(1) + (dist(mt) + jcnt) / icount_per_box * grid_box.length(1)); | ||
| p.pos(2) = static_cast<ParticleReal>(grid_box.lo(2) + (dist(mt) + kcnt) / icount_per_box * grid_box.length(2)); | ||
| // the position data | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think InitRandomPerBox needs a bigger rewrite.
0d800a5    to
    54d0623      
    Compare
  
    | // Add some particles | ||
| constexpr int NReal = 12; | ||
| constexpr int NInt = 4; | ||
| constexpr int NReal = AMREX_SPACEDIM + 12; | 
Check notice
Code scanning / CodeQL
Unused local variable
| constexpr int NReal = 12; | ||
| constexpr int NInt = 4; | ||
| constexpr int NReal = AMREX_SPACEDIM + 12; | ||
| constexpr int NInt = 2 + 4; | 
Check notice
Code scanning / CodeQL
Unused local variable
Support more init methods on SoA particle containers.
54d0623    to
    d2aa914      
    Compare
  
    | @atmyers @AlexanderSinn ready to review & merge :) This should help with #3290 
 | 
Summary
Support more init methods on SoA particle containers.
ParticleInitDataInitOnePerCellInitRandomPort InitRandom for pure SoA #3325InitRandomPerBoxAdditional background
Follow-up to #2878.
Needed for AMReX-Codes/pyamrex#124
Checklist
The proposed changes: